<template>
	<view>
		<img style="width:100%" :src="source" alt="">
	</view>
</template>

<script>
	import {
		url,
		request,
	} from '@/service/api.js'
	export default {
		data() {
			return {
				type: '',
				typeMap: {
					'注册协议': 'RICH_REGISTRATION_AGREEMENT',
					'防骗必看': 'RICH_FRAUD_PREVENTION',
					'新手帮助': 'RICH_NOVICE_HELP'
				},
				source: ''
			};
		},
		onLoad(params) {
			this.type =params.type
			request(url.getCommonVal, 'GET', {
				codeName: this.typeMap[this.type]
			}).then(res => {
				if (res.status === 200) {
					this.source = res.data.codeValue
				}
			})
		}
	}
</script>

<style lang="less">

</style>
